M.define(function (customerRepository) {
    
    
    return {
        search : function (matches, page, limit) {
            return customerRepository.search(matches, page, limit);
        },
        check : function (customer, certificate, username) {
            return customerRepository.check({
                "customerId!$not":customer.id,
                "username!$is":username
            });
        }
    }
})